﻿using System.Collections.Generic;
using System.Web.Mvc;
using KhatVongViet.Models;

namespace KhatVongViet.Controllers
{
    public class LayoutController : Controller
    {
        private readonly GetData getData = new GetData();

        [ChildActionOnly]
        public PartialViewResult _MostViewer()
        {
            List<Article> mostViewerList = getData.GetMostViewer();

            return PartialView(mostViewerList);
        }

        [ChildActionOnly]
        public PartialViewResult _HotNews()
        {
            List<Article> hotNewsList = getData.GetHotNews();

            return PartialView(hotNewsList);
        }
    }
}